{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style>
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0;
        margin-top: 0
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar" style="display:inline-block; margin-right:100px">
                        <a class="btn btn-default btn-outline {present name='types'}{eq name='types' value='1'}asdlkjasd{/eq}{else /}asdlkjasd{/present}"
                           href="{:url('income',['types'=>'1'])}">收益业绩</a>
                        <a class="btn btn-default btn-outline {eq name='types' value='2'}asdlkjasd{/eq}"
                           href="{:url('income',['types'=>'2'])}">充值业绩</a>
                    </div>
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">类型</th>
                                    <th data-align="center">图标</th>
                                    <th data-align="center">等级</th>
                                    <th data-align="center">团队业绩下限</th>
                                    <th data-align="center">收益比例</th>
                                    <th data-align="center">管理</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {volist name="data" id="v"}
                                <tr class="class">
                                    <td>
                                        {if condition="$v.types==2"}
                                        <span class="btn btn-primary btn-xs" style="background-color:#D8BFD8;border-color:#D8BFD8">充值业绩</span>
                                        {elseif condition="$v.types==1"}
                                        <span class="btn btn-primary btn-xs" style="background-color:#ADD8E6;border-color:#ADD8E6">收益业绩</span>
                                        {/if}
                                    </td>
                                    <td>
                                        <a href="__ROOT__{$v.icon}" target="_blank">
                                            <img style="width:40px" src="__ROOT__{$v.icon}"/>
                                        </a>
                                    </td>
                                    <td>{$v.name}</td>
                                    <td>{:number_format($v.min)}</td>
                                    <td>{$v.income * 100}%</td>
                                    <td>
                                        <div class="btn-group">
                                            <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                            </div>
                                            <ul class="dropdown-menu">
                                                <li><a onClick="add('{:url('addIncome',['id'=>$v['id'], 'url' => -1])}')">修改</a></li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">

    $(document).ready(function(){
        $('#delidAll').click(function(){
            $('input[type=checkbox]').each(function(){
                var self=$(this);
                if(!self.prop('checked')){
                    self.prop('checked',true);
                }else{
                    self.prop('checked',false);
                }
            });
        })
    });
</script>
